package cn.com.twoke.game.client.handler;

import cn.com.twoke.game.client.cache.ClientCacheManager;
import cn.com.twoke.game.common.entity.message.UpdateOnlineUserMessage;
import cn.com.twoke.game.common.handler.MessageHandler;

import java.io.IOException;
import java.nio.channels.Selector;
import java.nio.channels.SocketChannel;

public class UpdateOnlineUserMessageHandler implements MessageHandler<UpdateOnlineUserMessage> {

    @Override
    public void handle(Selector selector, SocketChannel channel, UpdateOnlineUserMessage message) throws IOException {
        ClientCacheManager.INSTANCE.setUserIds(message.getUserIds());
    }

}
